var page;
var Page = Class.create();

Page.prototype = {
	initialize: function () {
		this.myForm = $('myForm');
	},
	submit: function () {
		this.values = this.myForm.serialize(true);
		var shelf_price = parseCurrency(this.values.shelf_price);
		var bottle_size = parseFloat(this.values.bottle_size);
		var spirit_sales_tax = parseFloat(this.values.spirit_sales_tax);
		var sprit_liter_tax = parseFloat(this.values.sprit_liter_tax);
		var take_home_price = parseCurrency(this.values.take_home_price);
		take_home_price = ( ( shelf_price * spirit_sales_tax ) + ( ( bottle_size * sprit_liter_tax ) + shelf_price ) ) ;
		price_per_liter = take_home_price / bottle_size ;
		showCurrency(this.myForm, 'take_home_price', take_home_price);
		showCurrency(this.myForm, 'price_per_liter', price_per_liter);
	}
}

document.observe('dom:loaded', function() { page = new Page(); });

document.onkeyup=function(e) {
            if(e.which == 13){
                $('shelf_price').blur();
                //rest of function
                
                return false;
            }
}
		

if (document.getElementById) {
document.writeln('<style type="text/css"><!--')
document.writeln('.texter {display:none} @media print {.texter {display:block;}}')
document.writeln('//--></style>') }

function openClose(theID) {
if (document.getElementById(theID).style.display == "block") { document.getElementById(theID).style.display = "none" }
else { document.getElementById(theID).style.display = "block" } }